home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / programming / debug / calls / calls.0 < prev    next >
Encoding:
Text File  |  1996-09-07  |  5.5 KB  |  199 lines

  1.  
  2.  
  3.  
  4. CALLS(1)                                                 CALLS(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        calls - print out calling pattern of a C program
  9.  
  10. SSYYNNOOPPSSIISS
  11.        calls [-aeitv] [-w n] [-f function] [-F function[/file.c]]
  12.        [-D name[=def]] [-U name] [-I dir] [filenames]
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.        _C_a_l_l_s is intended to help analyze the flow of a program by
  16.        laying  out the functions called in a hierarchical manner.
  17.        _C_a_l_l_s invokes the C preprocessor on  the  named  C  source
  18.        files,  and  outputs the analyzed calling pattern to stan-
  19.        dard output.  All filenames given will have their  calling
  20.        sequences combined into one hierarchy.  If a filename of -
  21.        is seen, standard input will be read.
  22.  
  23.        Functions called but not defined within  the  source  file
  24.        are shown as:
  25.               function
  26.  
  27.        While  functions  defined  in  the source files are listed
  28.        with the file they are declared in in brackets, as shown:
  29.               function [main.c] , or
  30.               function [static in main.c]
  31.        or if the function is not being described
  32.               function [see also %d] , or
  33.               function [see below]
  34.  
  35.        Recursive references are shown as:
  36.               function <<< recursive >>>
  37.  
  38.        For example, given the file pprroogg..cc
  39.               main() {
  40.                    abc();
  41.                    def();
  42.               }
  43.               abc() {
  44.                    ghi();
  45.                    jkl();
  46.               }
  47.               static mno() { }
  48.               ghi() {
  49.                    abc();
  50.                    def();
  51.                    mno();
  52.               }
  53.  
  54.        Executing "calls prog.c" will produce:
  55.  
  56.                   1     main [prog.c]
  57.                   2          abc [prog.c]
  58.                   3               ghi [prog.c]
  59.                   4                    abc <<< recursive >>>
  60.                   5                    def
  61.  
  62.  
  63.  
  64.                               UNSUP                             1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CALLS(1)                                                 CALLS(1)
  71.  
  72.  
  73.                   6                    mno [static in prog.c]
  74.                   7               jkl
  75.                   8          def
  76.  
  77. FFLLAAGGSS
  78.        --aa     Normally only the  first  call  to  a  function  is
  79.               recorded  for any given function, under this option
  80.               all calls are recorded. This may  make  the  output
  81.               for  some large programs very verbose and these are
  82.               normally not needed to show the  calling  structure
  83.               of a program.
  84.  
  85.        --ee     Normally  an index listing (-i below) does not con-
  86.               tain the external functions called in the  program,
  87.               under this option these are also listed.  Note this
  88.               option also turns on the indexing option, -i.
  89.  
  90.        --ff_f_u_n_c_t_i_o_n
  91.               The named function will be printed as the root of a
  92.               calling tree.
  93.  
  94.        --FF_f_u_n_c_t_i_o_n
  95.               The  named  static  function (in the given file) is
  96.               used as the base of a calling tree, as above.  This
  97.               allows  closer  examination of sources such as that
  98.               of dbx(1) that have many functions  with  the  same
  99.               name.
  100.  
  101.        --hh     Display a brief help message.
  102.  
  103.        --ii     This  option produces an index of all the functions
  104.               declared in the  processed  files.  Optionally  all
  105.               functions mentioned can be output; see -e above.
  106.  
  107.        --tt     This  option instructs _c_a_l_l_s not to display calling
  108.               trees that were not explicitly  asked  for  on  the
  109.               command  line.  Using  this  option  as well as the
  110.               index option one can produce just  a  list  of  the
  111.               functions declared in a file.
  112.  
  113.        --vv     Be  less verbose in the index output, do not output
  114.               any defined functions that were not present in  any
  115.               of  the  output trees.  Note this also turns on the
  116.               index option.  For a list of all  functions  called
  117.               by  'missle'  one might examine the index output of
  118.               "calls -vt -f missle *.c".
  119.  
  120.        --ww_n    Set the max indentation width to n.  The default is
  121.               96 columns.
  122.  
  123.        --DD_n_a_m_e
  124.  
  125.        --DD_n_a_m_e_=_d_e_f
  126.               Define  the  _n_a_m_e  for  the  preprocessor, as if by
  127.  
  128.  
  129.  
  130.                               UNSUP                             2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CALLS(1)                                                 CALLS(1)
  137.  
  138.  
  139.               #define.  If no definition is given,  the  name  is
  140.               defined as 1.
  141.  
  142.        --UU_n_a_m_e Remove  any  initial definition of _n_a_m_e in the pre-
  143.               processor.
  144.  
  145.        --II_d_i_r  Change the path for searching  for  #include  files
  146.               whose  names  do  not  begin  with / to look in _d_i_r
  147.               before looking in the directories on  the  standard
  148.               list.
  149.  
  150. BBUUGGSS
  151.        Static functions must be declared (in full) _b_e_f_o_r_e used to
  152.        work properly.
  153.        Output width checking is only done on the first  character
  154.        on a new line.
  155.  
  156. AAUUTTHHOORR
  157.        Originally  from the net. Major revisions by Kevin Brauns-
  158.        dorf, PUCC.
  159.  
  160. SSEEEE AALLSSOO
  161.        cpp(1), cc(1), ctags(1)
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                               UNSUP                             3
  197.  
  198.  
  199.